package com.wenhao.jd;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @author Wenhao Tong
 * @create 2021-08-21 19:41
 */
public class Main2 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        String s = scanner.next();
        Integer zero = 0;
        Integer one = 0;
        Map<Double,Integer> map = new HashMap<>();
        for (int i = 0;i < n;i++) {
            if (s.charAt(i) == '1') {
                one++;
            } else {
                zero++;
            }
            if (zero == 0) {
                if (map.containsKey(Double.MAX_VALUE)) {
                    map.put(Double.MAX_VALUE,map.get(Double.MAX_VALUE) + 1);
                } else {
                    map.put(Double.MAX_VALUE,1);
                }
                System.out.println(map.get(Double.MAX_VALUE) + " ");
            } else {
                Double temp = one.doubleValue() / zero.doubleValue();
                if (map.containsKey(temp)) {
                    map.put(temp,map.get(temp) + 1);
                } else {
                    map.put(temp,1);
                }
                System.out.print(map.get(temp) + " ");
            }
        }
    }
}
